package edu.wpi.first.wpilibj.robot;

import edu.wpi.first.wpilibj.*;

public class AutoAngle extends Motor{
    
    GyroMotor gyro;
    boolean done = false;
    
    public AutoAngle(Jaguar[] duper, GyroMotor gyro){
        super(duper);
        this.gyro = gyro;
    }
    
    public void run(){
        while(true){
            double angle = gyro.angle-67;
            
            if (Math.abs(angle) > 3){
                if (angle>0) theJags[1].set(-1);
                else if (angle < 0) theJags[1].set(1);
            }
            else{
                done = true;
                theJags[1].set(0);
            }
            
            
            
        }
    }
    
}
